<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('变更返现对象')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-formalPos-saveReturnObj">
        <h4 class="form-header h4">代理信息</h4>
        <div class="form-group">
            <label class="col-sm-3 control-label">目标代理：</label>
            <div class="col-sm-8">
                <textarea name="agentNum" maxlength="500" class="form-control" placeholder="请输入代理商编号,多个代理商使用英文逗号分隔" rows="3"></textarea>
                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>单个代理变更示例:100</span>
                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>多个代理变更示例:100,200,300</span>
            </div>
        </div>
        <h4 class="form-header h4">变更规则</h4>
        <div class="form-group">
            <label class="col-sm-3 control-label">变更规则：</label>
            <div class="col-sm-8">
                <select name="level" class="form-control m-b">
                    <option value="1">本级</option>
                    <option value="2">本级及以下</option>
                </select>
                <span class="help-block m-b-none">1、<span style="color:red;">本级和本级及以下变更时不包含目标代理</span></span>
                <span class="help-block m-b-none">2、<span style="color:red;">本级为目标代理的直属代理商</span></span>
                <span class="help-block m-b-none">3、<span style="color:red;">本级及以下为目标代理的整个代理体系</span></span>
            </div>
        </div>
        <h4 class="form-header h4">返现对象信息</h4>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">激活返现对象：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text"  name="actAgentNum" />
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">达标返现对象：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text"  name="reachAgentNum" />
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">流量卡返现对象：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text"  name="flowAgentNum" />
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">服务费返现对象：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text"  name="serviceAgentNum" />
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">阶段达标返现对象：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text"  name="staReachAgentNum" />
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script type="text/javascript">
    var prefix = ctx + "formalPos/formalPos";
    $("#form-agentInfo-resetPwd").validate({
        rules:{
            password:{
                required:true,
                minlength: 5,
                maxlength: 20
            },
        },
        focusCleanup: true
    });

    $("input[name='actEnd']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/saveBatchReturnObj", $('#form-formalPos-saveReturnObj').serialize());
        }
    }
</script>
</body>

</html>
